package com.qu.waibao.home.adpater;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.qu.waibao.R;
import com.qu.waibao.base.BaseRecyclerAdapter;
import com.qu.waibao.bean.HomeBean;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @描述 describe
 * @作者 Administrator
 * @创建时间 2018/7/23 16:22
 * @邮箱 1123599561@qq.com
 */
public class KefuAdapter extends BaseRecyclerAdapter<HomeBean.ServicephoneBean> {
    public KefuAdapter(Context context, int mode) {
        super(context, mode);
    }

    @Override
    protected RecyclerView.ViewHolder onCreateDefaultViewHolder(ViewGroup parent, int type) {
        return new KefuViewHolder(mInflater.inflate(R.layout.kefu_recycler_item,parent,false));
    }

    @Override
    protected void onBindDefaultViewHolder(RecyclerView.ViewHolder holder, HomeBean.ServicephoneBean item, int position) {
        KefuViewHolder kefuViewHolder = (KefuViewHolder) holder;
        kefuViewHolder.tv_phone.setText(item.getJianjie());
    }

    class KefuViewHolder extends RecyclerView.ViewHolder{
        @BindView(R.id.tv_phone)
        TextView tv_phone;
        public KefuViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this,itemView);
        }
    }
}
